package api

object ListTest {
  def main(args: Array[String]): Unit = {
    val value = List.range(1, 5).flatMap(i => List.range(1, i).map(j => (i, j)))
    println(value)

    val value1 = List[Int](2, 3, 4, 5)
    println(sum(value1))
  }

  def sum(item: List[Int]): Int = {
    (0 /: item) (_ + _)
  }

}
